<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommoditiesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
    public function up()
    {
        Schema::create('commodities', function(Blueprint $table)
        {
            $table->increments('id');
            $table->smallInteger('type');
            $table->string('name');
            $table->string('cover');
            $table->text('dec')->nullable();
            $table->text('content')->nullable();
            $table->integer('life')->nullable();
            $table->integer('member_price')->nullable();
            $table->integer('public_price')->nullable();
            $table->integer('member_points')->nullable();
            $table->integer('number')->nullable();
            $table->timestamps();
        });
    }

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('commodities');
	}

}
